﻿using System.Security.Cryptography;
using System.Text;

namespace bpms.Utils
{
    /// <summary>
    /// 密码加密帮助类
    /// </summary>
    public class PasswordHelper
    {
        public static string MD5Encrypt(string input)
        {
            using var md5 = MD5.Create();
            var inputBytes = Encoding.UTF8.GetBytes(input);
            var hashBytes = md5.ComputeHash(inputBytes);
            return BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
        }
    }
}
